<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/11/22 0022
  Time: 下午 7:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>租车登记</title>
    <link rel="stylesheet" href="/static/css/common.css">
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <style>

        .layui-form-item input{
            width: 40%;
        }


    </style>
</head>
<body>
<div class="box-padding-15">
         <span class="layui-breadcrumb">
          <a href="/" target="_top">首页</a>
          <a href="javascript:;">入库管理</a>
          <a><cite>产品信息预览</cite></a>
        </span>
    <hr>
    <div class="box-form">
        <form class="layui-form " action="/order/dj2" method="post"  id="formid">

            <div class="layui-form-item">
                <label class="layui-form-label">供应商：</label>
                <div class="layui-input-block">
                    <input type="text" name="mobile" id="mobile" required style="display: inline-block" autocomplete="off" placeholder="恒星集团" class="layui-input" disabled="disabled">

                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">产品名称：</label>
                <div class="layui-input-block">
                    <input type="text" name="name"  id="name" required autocomplete="off" placeholder="316不锈钢丝绳" class="layui-input" disabled="disabled">
                </div>
            </div>

            <div class="layui-form-item ">
                <label class="layui-form-label">产品规格：</label>
                <div class="layui-input-block">
                    <input type="text" name="idCard"   id="idcard" placeholder="直径 20（mm）抗拉强度 6000（MPa）"   autocomplete="off" class="layui-input" disabled="disabled">
                </div>
            </div>



            <div  class="layui-form-item ">
                <label class="layui-form-label">产品称重：</label>
                <div class="layui-input-block">
                    <input type="text" name="driverNum"  id="drivernum"  autocomplete="off" placeholder="500（kg）" class="layui-input" disabled="disabled"/>
                </div>
            </div>

            <div  class="layui-form-item ">
                <label class="layui-form-label">扫描员：</label>
                <div class="layui-input-block">
                    <input type="text" name="driverNum"  id="driver" placeholder="张三" autocomplete="off" class="layui-input" disabled="disabled"/>
                </div>
            </div>

            <div  class="layui-form-item ">
                <label class="layui-form-label">入库时间：</label>
                <div class="layui-input-block">
                    <input type="text" name="driverNum"  id="d"  autocomplete="off" placeholder="2017-12-18" class="layui-input" disabled="disabled"/>
                </div>
            </div>


            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" type="button" id="b">自动放置</button>

                    <button class="layui-btn" lay-submit lay-filter="formSubmit" id="btn" >手动放置</button>

                </div>



            </div>
        </form>
    </div>

</div>

<script src="/static/plugins/jquery-3.2.1.min.js"></script>
<script src="/static/plugins/layui/layui.js"></script>
<script>



    layui.use(['upload','laydate','element','layer','form'], function() {
        var $ = layui.jquery
            , upload = layui.upload
            , laydate = layui.laydate
            , form = layui.form
            , element = layui.element
            , layer = layui.layer;


        $("#btn").on("click", function () {
            var moblie = $("#mobile").val();
            var name = $("#name").val();
            var idcard = $("#idcard").val();
            var drivernum = $("#drivernum").val();
            var orgCode = $("#orgCode").val();
            var taxCertNo = $("#taxCertNo").val();
            $.ajax({
                url: "/order/djMsg",
                type: "post",
                data: {mobile: moblie, name: name, idCard: idcard, drivenNum: drivernum, orgCode: orgCode,taxCertNo:taxCertNo},
                dataType: "json",
                success: function (rs) {
                    location.href="/order/dj2";
                    console.log("传参成功")
                },
                error: function () {
                    console.log("请求失败")
                }
            })
            return false;
        });

        $("#b").click(function () {
            layer.open({
                content:'点击确认执行，钢缆将自动完成入库',
                btn: ['确认执行', '取消']
                ,yes: function(index, layero){
                    layer.open({
                        content:'执行成功！数据已保存，plc运作中...'
                    })
                },btn2: function(index, layero){
                    //按钮【按钮二】的回调
                }
            })
        })

    })









</script>
</body>


</html>
